<% ARQUIVO = "tabela_preco" vpaginax = Request("pagina") if trim(vpaginax) = "" or isnull(vpaginax) then vpaginax = "1" end if vtipo ="" vtipo = Request("tipo") vfornecedor = Request("fornecedor") vindice = "PRECO_EXIBICAO" if Request("indice") <> "" then vindice = Request("indice") end if Set OBJdbConnection = Server.CreateObject("ADODB.Connection") OBJdbConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/banco/okey.mdb") & ";Persist Security Info=False" if trim(vtipo) <> "" and trim(vfornecedor) <> "" then SQL = "SELECT * FROM TABELA_PRECO WHERE tipo ='" & vtipo & "' AND FORNECEDOR ='" & vfornecedor & "' ORDER BY " & vindice ' SQL = "SELECT * FROM TABELA_PRECO WHERE preco_exibicao > 0 and tipo ='" & vtipo & "' AND FORNECEDOR ='" & vfornecedor & "' ORDER BY " & vindice else SQL = "SELECT * FROM TABELA_PRECO WHERE tipo ='" & vtipo & "' ORDER BY " & vindice ' SQL = "SELECT * FROM TABELA_PRECO WHERE preco_exibicao > 0 and tipo ='" & vtipo & "' ORDER BY " & vindice end if Set RS=OBJdbConnection.Execute(SQL) SQL2 = "SELECT * FROM DOLAR" Set RS2=OBJdbConnection.Execute(SQL2) vdolardia = rs2("dolar") if RS.EOF then erro = "1" else erro = "0" vtotalregistros = 0 vtotalf=0 do while not rs.eof vtotalregistros = vtotalregistros + 1 rs.movenext loop vfor = ((vpaginax -1) * 30) + 1 if vfor = 1 then rs.movefirst else rs.movefirst for y = 1 to vfor -1 if not rs.eof then rs.movenext end if next end if vtpag = ROUND(vtotalregistros / 30,1) if vtpag > int(vtpag) then vtpag = int(vtpag) + 1 end if vap = "" if vtpag = 0 then vtpag = 1 end if for y = 1 to vtpag vap = vap & y & "^" next Response.Write "PAGINAS : " & vtpag if trim(vap) = "" or trim(vap) = "^" then vap = "1" & "^" end if varray = Split(vap,"^") end if if trim(Session("email_carrinho")) <> "" then vrevenda = Session("email_carrinho") else vrevenda = "" end if %>
<% if trim(vrevenda) = "" then %>
<% else %>
<% end if %>
<% if trim(vrevenda) = "" then %> <% else %> > <% end if %>
DOLAR : <%= vdolardia %>
<% if erro = "0" then %>
<%= UCASE(vtipo)%>
Páginas : <% for w = 0 to Ubound(varray) %> <% if w+1 = cdbl(vpaginax) then %> <% vcolor = "#FF0000" %> <% else %> <% vcolor = "#0000FF" %> <% end if %> > <% =varray(w) %> <% next %>
<%vcw = 1%> <% do while not rs.eof and vcw <= 30 %> <% rs.movenext %> <% vcw = vcw + 1 %> <% loop %> <% OBJdbConnection.close %>
PDF
FOTO
HTML
COMPRAR
/catalogos/<%=trim(RS("CODIGO"))& ".pdf" %>" target="_blank">CATALOGO PDF <% = rs("fornecedor") %>
<%= RS("descricao") & " Partnumber : " & RS("CODIGO")%>
<% = rs("preco_exibicao") %>
Registros : <% = vtotalregistros%>
Páginas : <% for w = 0 to Ubound(varray) %> <% if w+1 = cdbl(vpaginax) then %> <% vcolor = "#FF0000" %> <% else %> <% vcolor = "#0000FF" %> <% end if %> > <% =varray(w) %> <% next %>
<% else %> <%Response.Redirect "http://www.okey.com.br"%> <% end if %>